package cn.edu.scau.cmi.yangzhengkai.simpleFactoryMethod;

import cn.edu.scau.cmi.yangzhengkai.simpleFactoryMethod.domain.Beef;
import cn.edu.scau.cmi.yangzhengkai.simpleFactoryMethod.domain.Chicken;
import cn.edu.scau.cmi.yangzhengkai.simpleFactoryMethod.domain.Meat;
import cn.edu.scau.cmi.yangzhengkai.simpleFactoryMethod.domain.Pork;

public class MeatFactory {
	
	public static Meat getMeat(String meatTypeString) {
		
		Meat meat = null;
		switch (meatTypeString) {
		case "beef":
			meat = new Beef(); 
			break;
		case "chicken":
			meat = new Chicken();
			break;
		case "pork":
			meat = new Pork();
			break;
		default:
			break;
		}
		return meat;
	}
		
	

}
